 <?php

include("./conn/conn.php");
header("content-type:text/html;charset=utf-8");
session_start();
$time=date("Y-m-d");
$content=$_POST['vpl'];
$name=$_SESSION['name'];
$id=$_SESSION['id'];
$dook='否';
echo $name;
echo $content;
echo $time;
echo $id;
echo $dook;
if($_SESSION['name']!=""){
$sql_PL="insert into tb_lyxt(people,content,time,show,id_room) values('$name','$content','$time','$dook','$id')";
$result=$link->query($sql_PL);
if($result){
echo "<script> alert('评论成功，需要审核才能显示哦！' );history.go(-1);</script>";
}else{
	echo 'cuow';
	}
}else{
	echo "<script> alert('请登陆后评论！' );location='dlym.php';</script>";
	}
	
?>